<template>
    <Pie title="业务运费占比" :semicircle="true" :percent="true" :config="config" />
</template>

<script setup>
import Pie from '../components/Pie.vue';

const data = [
    {
        name: '销售',
        value: 100,
    },
    {
        name: '采购',
        value: 100,
    },
    {
        name: '调拨',
        value: 100,
    },
];

const config = {
    tooltip: {
        trigger: 'item',
    },
    legend: {
        left: 'right',
    },
    title: {
        top: '55%',
        left: 'center',
        text: '运输量\n 123213123(吨)',
    },
    series: [
        {
            label: {
                rich: {
                    ratio: {
                        fontSize: 20,
                        lineHeight: 22,
                        fonWight: 500,
                    },
                    text: {
                        marginTop: 10,
                        fontSize: 12,
                        lineHeight: 20,
                    },
                },
                formatter: '{b|{b}}\n{text|{c}}',
            },
            radius: ['45%', '90%'],
            data,
        },
    ],
};
</script>

<style scoped></style>
